﻿using System.Web.Mvc;
using IterationLife.Extensions.MvcApi;
using IterationLife.Mobile.AppServices.Services.System;

namespace IterationLife.Mobile.ApiGateway.Controllers
{
    public class GeolocationController:MvcApiController
    {
        private readonly IGeolocationService _geolocationService;

        public GeolocationController(IGeolocationService geolocationService)
        {
            _geolocationService = geolocationService;
        }
        [HttpGet]
        public ActionResult GetGeolocations(string parentCode = null)
        {
            var geolocations = _geolocationService.GetGeolocations(parentCode);
            return Ok(geolocations);
        }

        public ActionResult GetAllGeolocations()
        {
            var geolocations = _geolocationService.GetAllGeolocations();
            return Ok(geolocations);
        }

        public ActionResult SearchGeolocations(string searchKey)
        {
            return Ok();
        }
    }
}